<?php


namespace app\mod\pcr;


use app\common\service\MediaService;
use core\event\EventGroupMessage;
use core\Mod;

class QAMod extends Mod {

    public function eventGroupMessage(EventGroupMessage $event) {

        $media_service = new MediaService();

        $message = strtolower($event->getMessage()->string());
        if (contains($message, '#ylyjjc')) {
            $image = $media_service->getByName("YLY-JJC队");
            $event->getGroup()->sendMessage(image($image['uri']));
        }
    }

}
